package com.admin.dbdao;

import com.data.dbdao.BaseDao;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.List;

/**
 * 付费推广的首页软件
 *
 * @author:HingLo
 * @create 2017-09-27 12:51
 **/
@Repository
@Transactional
public class PayAppAdminDao extends BaseDao {
    public List<?> findAllPayAppAdminDao() {
        String hql = " select p.id,a.name,p.starttime,p.endtime,p.type,a.id from PayApp as p ,App as a where p.rid=a.id";
        return super.findMassageDao(hql);
    }

    public boolean deletePayAppAdminDao(String id) {
        String hql = "delete PayApp where id=?";
        return super.updateManyMssageDao(hql, id) > 0;
    }
}
